package ${domain}.action.msvr.${module};

import ${domain}.frame.auth.LocalData;
import ${domain}.module.${module}.mgr.${table.getCName()}Manager;
<#if table.getCreate()>
import ${domain}.module.${module}.req.${table.getCName()}CreateRequest;
</#if>
<#if table.getDelete()>
import ${domain}.module.${module}.req.${table.getCName()}DeleteRequest;
</#if>
<#if table.getFind()>
import ${domain}.module.${module}.req.${table.getCName()}FindRequest;
</#if>
<#if table.getGet()>
import ${domain}.module.${module}.req.${table.getCName()}GetRequest;
</#if>
<#if table.getSearch()>
import ${domain}.module.${module}.req.${table.getCName()}SearchRequest;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${module}.req.${table.getCName()}UpdateRequest;
</#if>
<#if table.getCreate()>
import ${domain}.module.${module}.rsp.${table.getCName()}CreateResponse;
</#if>
<#if table.getDelete()>
import ${domain}.module.${module}.rsp.${table.getCName()}DeleteResponse;
</#if>
<#if table.getFind()>
import ${domain}.module.${module}.rsp.${table.getCName()}FindResponse;
</#if>
<#if table.getGet()>
import ${domain}.module.${module}.rsp.${table.getCName()}GetResponse;
</#if>
<#if table.getSearch()>
import ${domain}.module.${module}.rsp.${table.getCName()}SearchResponse;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${module}.rsp.${table.getCName()}UpdateResponse;
</#if>
<#list table.methods as item>
<#if item.selected>
import ${domain}.module.${module}.req.${table.getCName()}${item.getAbbName()?default("")}Request;
import ${domain}.module.${module}.rsp.${table.getCName()}${item.getAbbName()?default("")}Response;
</#if>
</#list>
import org.springframework.beans.factory.annotation.Autowired;

public class ${table.getCName()}Msvr{

    @Autowired
    private ${table.getCName()}Manager ${table.getFName()}Manager;

<#if table.getCreate()>
    public ${table.getCName()}CreateResponse create(${table.getCName()}CreateRequest request) {
        return ${table.getFName()}Manager.create(request, LocalData.getToken());
    }
</#if>
<#if table.getDelete()>

    public ${table.getCName()}DeleteResponse delete(${table.getCName()}DeleteRequest request) {
        return ${table.getFName()}Manager.delete(request, LocalData.getToken());
    }
</#if>
<#if table.getUpdate()>

    public ${table.getCName()}UpdateResponse update(${table.getCName()}UpdateRequest request) {
        return ${table.getFName()}Manager.update(request, LocalData.getToken());
    }
</#if>
<#if table.getFind()>

    public ${table.getCName()}FindResponse find(${table.getCName()}FindRequest request) {
        return ${table.getFName()}Manager.find(request, LocalData.getToken());
    }
</#if>
<#if table.getGet()>

    public ${table.getCName()}GetResponse get(${table.getCName()}GetRequest request) {
        return ${table.getFName()}Manager.get(request, LocalData.getToken());
    }
</#if>
<#if table.getSearch()>

    public ${table.getCName()}SearchResponse search(${table.getCName()}SearchRequest request) {
        return ${table.getFName()}Manager.search(request, LocalData.getToken());
    }
</#if>
<#list table.methods as item>
<#if item.selected>

    public ${table.getCName()}${item.getAbbName()?default("")}Response ${item.name}(${table.getCName()}${item.getAbbName()?default("")}Request request) {
        return ${table.getFName()}Manager.${item.name}(request, LocalData.getToken());
    }
</#if>
</#list>
}
